package com.epoint.mobileoa.bizlogic.mobileoa;

import java.util.Date;
import java.util.HashMap;

import android.os.Message;

import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.http.HttpHelp;
import com.epoint.mobileoa.tools.DateHelp;

/**
 * @author liyc
 * @time 2012-5-3 下午2:23:29
 * @annotation 
 */
public class GetServerTimeTask extends Task {

	/**
	 * @param con
	 * @param param
	 */
	public GetServerTimeTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String seamurl = generateURL("GetServerTime");
		String bs = HttpHelp.getHttpBack(seamurl);
		Date date = DateHelp.convertString2Date(bs, "yyyy-MM-dd hh:mm:ss");
		setMessageToRefreshUI(mess, getCon(), date);
	}

}
